package co.edu.udistrital.analyzer.web.managedbean;

import java.io.Serializable;

import javax.faces.application.FacesMessage;
import javax.faces.application.FacesMessage.Severity;
import javax.faces.context.FacesContext;

/**
 * Managed bean for the common actions
 * 
 * @author Alejo
 * 
 */
public abstract class AbstractCommonBean implements Serializable {

	/**
	 * Serial version id
	 */
	private static final long serialVersionUID = 3192730012610978808L;

	/**
	 * Shows a visual message with the params
	 * 
	 * @param severity
	 * @param summary
	 * @param detail
	 */
	protected void showMessage(Severity severity, String summary, String detail) {
		FacesMessage msg = new FacesMessage(severity, summary, detail);
		FacesContext.getCurrentInstance().addMessage(null, msg);
	}
}